Split gtk-4-tests into its own package
authorSimon McVittie <smcv@debian.org>
Thu, 17 Dec 2020 13:38:19 +0000 (13:38 +0000)
committerSimon McVittie <smcv@debian.org>
Thu, 17 Dec 2020 13:38:19 +0000 (13:38 +0000)
debian/control
debian/control.in
debian/gtk-4-examples.install
debian/gtk-4-tests.install [new file with mode: 0644]
debian/rules
debian/tests/control

index 0a16447a1b09468fd9e0900399c44f334b8661f6..0167a64f034977b5c4fdc01b4d5bb4cfa1aebf8a 100644 (file)
@@ -223,6 +223,26 @@ Description: example files for GTK 4
  This package contains the example files and a demonstration program
  for GTK4. It also contains the installed tests.
 
+Package: gtk-4-tests
+Build-Profiles: <!noinsttest>
+Section: x11
+Architecture: any
+Depends: iso-codes,
+         librsvg2-common,
+         ${misc:Depends},
+         ${shlibs:Depends},
+         libgtk-4-1 (= ${binary:Version}),
+Recommends: gnome-desktop-testing,
+            locales | locales-all,
+Description: "as-installed" tests for GTK 4
+ GTK is a multi-platform toolkit for creating graphical user
+ interfaces. Offering a complete set of widgets, GTK is suitable
+ for projects ranging from small one-off tools to complete application
+ suites.
+ .
+ This package contains installable test programs, primarily for use with
+ autopkgtest.
+
 Package: gir1.2-gtk-4.0
 Section: introspection
 Architecture: any
index e0efecb9b39a6c44cfb512fb0da9e709ded59d4b..133771a0653311f51165a76c3de25b2bea135ee1 100644 (file)
@@ -223,6 +223,26 @@ Description: example files for GTK 4
  This package contains the example files and a demonstration program
  for GTK4. It also contains the installed tests.
 
+Package: @TESTS_PKG@
+Build-Profiles: <!noinsttest>
+Section: x11
+Architecture: any
+Depends: iso-codes,
+         librsvg2-common,
+         ${misc:Depends},
+         ${shlibs:Depends},
+         @SHARED_PKG@ (= ${binary:Version}),
+Recommends: gnome-desktop-testing,
+            locales | locales-all,
+Description: "as-installed" tests for GTK 4
+ GTK is a multi-platform toolkit for creating graphical user
+ interfaces. Offering a complete set of widgets, GTK is suitable
+ for projects ranging from small one-off tools to complete application
+ suites.
+ .
+ This package contains installable test programs, primarily for use with
+ autopkgtest.
+
 Package: gir1.2-gtk-4.0
 Section: introspection
 Architecture: any
index 085e2202c29fa45da91522f3c10d472287911375..25393337b84f62964c692c593aae5e34bed4182f 100644 (file)
@@ -3,7 +3,6 @@ usr/bin/gtk4-demo-application
 usr/bin/gtk4-icon-browser
 usr/bin/gtk4-print-editor
 usr/bin/gtk4-widget-factory
-usr/libexec/installed-tests/gtk-4.0
 usr/share/applications/org.gtk.Demo4.desktop
 usr/share/applications/org.gtk.IconBrowser4.desktop
 usr/share/applications/org.gtk.PrintEditor4.desktop
@@ -13,7 +12,6 @@ usr/share/icons/hicolor/*/*/org.gtk.Demo4*
 usr/share/icons/hicolor/*/*/org.gtk.IconBrowser4*
 usr/share/icons/hicolor/*/*/org.gtk.PrintEditor4*
 usr/share/icons/hicolor/*/*/org.gtk.WidgetFactory4*
-usr/share/installed-tests/gtk-4.0
 usr/share/man/*/gtk4-demo-application.*
 usr/share/man/*/gtk4-demo.*
 usr/share/man/*/gtk4-icon-browser.*
diff --git a/debian/gtk-4-tests.install b/debian/gtk-4-tests.install
new file mode 100644 (file)
index 0000000..ca08e37
--- /dev/null
@@ -0,0 +1,2 @@
+usr/libexec/installed-tests/gtk-4.0
+usr/share/installed-tests/gtk-4.0
index ef4373e604e5938cfc85deb8e5735c38d1b1d90d..42657bb31b5573aaeba72f87bfabd9672afa0768 100755 (executable)
@@ -40,6 +40,7 @@ UDEB_PKG := $(SHARED_PKG)-udeb
 DOC_PKG := libgtk-$(APIVER)-doc
 BIN_PKG := libgtk-$(APIVER)-bin
 EXAMPLES_PKG := gtk-$(APIVER)-examples
+TESTS_PKG := gtk-$(APIVER)-tests
 
 # files larger than 4k in size will be compressed by dh_compress
 # so append a .gz suffix to avoid dangling symlinks
@@ -64,6 +65,7 @@ debian/%: debian/%.in
                -e "s#@DOC_PKG@#$(DOC_PKG)#g" \
                -e "s#@BIN_PKG@#$(BIN_PKG)#g" \
                -e "s#@EXAMPLES_PKG@#$(EXAMPLES_PKG)#g" \
+               -e "s#@TESTS_PKG@#$(TESTS_PKG)#g" \
                -e "s#@GNOME_TEAM@#$(UPLOADERS)#g" \
                -e "s#@GTK_BINARY_VERSION@#$(GTK_BINARY_VERSION)#g" \
                -e "s#@LIBDIR@#$(LIBDIR)#g" \
@@ -111,10 +113,14 @@ endif
 ifeq ($(filter %-examples,$(built_binaries)),)
 configure_flags_deb += -Dbuild-examples=false
 configure_flags_deb += -Ddemos=false
-configure_flags_deb += -Dinstall-tests=false
 else
 configure_flags_deb += -Dbuild-examples=true
 configure_flags_deb += -Ddemos=true
+endif
+
+ifeq ($(filter %-tests,$(built_binaries)),)
+configure_flags_deb += -Dinstall-tests=false
+else
 configure_flags_deb += -Dinstall-tests=true
 endif
 
index 076785a2a4cb39390064ddcd5a406fd98140f44f..bd26ad4472ec819eabd87a22732d215b1da48710 100644 (file)
@@ -8,9 +8,9 @@ Depends: dbus, gir1.2-gtk-4.0, python3-gi, xauth, xvfb
 Restrictions: flaky, superficial
 
 Tests: installed-tests
-Depends: dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, iso-codes, locales | locales-all, librsvg2-common, xauth, xvfb
-Restrictions: allow-stderr, flaky
+Depends: dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, xauth, xvfb
+Restrictions: allow-stderr
 
 Tests: installed-tests-flaky
-Depends: dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-examples, iso-codes, locales | locales-all, librsvg2-common, xauth, xvfb
+Depends: dbus (>= 1.8), gnome-desktop-testing (>= 2018.1-1~), gtk-4-tests, locales | locales-all, xauth, xvfb
 Restrictions: allow-stderr, flaky